function getAvatar(imageId, userId){
    if ( imageId === null || !appWindow.showimage )
        return ""
    else {
        return "http://img.qiushibaike.com/system/avtnew/%1/%2/thumb/"
        .arg(userId.slice(0,-4)).arg(userId)+imageId
    }
}

function getImageUrl(type, imageId){
    if (undefined===imageId|| imageId === null )
        return ""
    else {
        console.log("http://img.qiushibaike.com/system/pictures/"
                    +imageId.match(/\d+/)[0]
                    +"/"+type+"/"+imageId)
        return "http://img.qiushibaike.com/system/pictures/"
                +imageId.match(/\d+/)[0]
                +"/"+type+"/"+imageId
    }
}

function getRandomDate(){
    var ori = new Date(2007,1,1)
    return Qt.formatDate(new Date(ori.getTime()+Math.round(Math.random()*(new Date()-ori))), "yyyy-MM-dd")
}
